1. Field of Invention
The present invention relates to image compression/decompression, and more particularly relates to the reference image compression/decompression for achieving a predetermined compression ratio.
2. Description of Related Art
Digital image and motion video have been adopted in an increasing number of applications, which include digital camera, scanner/printer/fax machine, video telephony, videoconferencing, surveillance system, VCD (Video CD), DVD, digital TV . . . etc. In the past decades, ISO and ITU have separately or jointly developed and defined some digital video compression standards including JPEG, JPEG2000, JBIG, MPEG-1, MPEG-2, MPEG-4, MPEG-7, H.261, H.263 and H.264. The success of development of the still image and video compression standards fuels wider applications. The advantage of image and video compression techniques significantly saves the storage space and transmission time without sacrificing much of the image quality.
There are essentially three types of picture encoding in the MPEG video compression standard. I-frame, the “Intra-coded” picture uses the block of 8×8 pixels within a frame to code itself. P-frame, the “Predictive” frame uses previous I-frame or P-frame as a reference to code the difference. B-frame, the “Bi-directional” interpolated frame uses previous I-frame or P-frame as well as the next I-frame or P-frame as references to code the pixel information. In principle, in the I-frame encoding, all “Block” with 8×8 pixels go through the same compression procedure that is similar to that of JPEG, the still image compression algorithm including the DCT, quantization and a VLC, the variable length encoding. Meanwhile, the P-frame and B-frame have to code the difference between a target frame and the reference frames.
In the non-intra picture encoding, the first step is to identify the best match block followed by encoding the block pixel differences between a target block and the best match block. For some considerations including accuracy, performance and encoding efficiency, a frame is partitioned into macro-blocks of, for instance 16×16 pixels for estimating the block pixel differences and the block movement, called “motion vector”, the MV. Each macro-block within a frame has to find the “best match” macro-block in the previous frame or the next frame. The procedure of searching for the best match macro-block is called “Motion Estimation.” A “Searching Range” is commonly defined to limit the computing times in the “best match” block searching. For example a +/−16 pixels in X-axis and +/−16 in Y-axis surrounding the target block. According to the MPEG standard, a macro block is composed of four 8×8 “blocks” of “Luma (Y)” and one, two or four “Chroma (Cb and Cr)”. Since Luma and Chroma are closely associated, in the motion estimation, there is need of the estimation only for Luma, the Chroma, Cb and Cr in the corresponding position copy the same MV of Luma. The Motion Vector, MV, represents the direction and displacement of the movement of block of pixels. For example, an MV=(5,−3) stands for the block movement of 5 pixels right in X-axis and 3 pixel down in the Y-axis.
The reference frames 28, 29, 218, 219 video encoding and decoding as shown in FIG. 2A and FIG. 2B occupy high amount of storage device which are most commonly stored in off-chip memory buffer 27, 217 RAM. Transporting pixels between a video encoder or decoder chip and the memory buffer consumes high bandwidth of the I/O bus of memory storing the frame buffers. Besides, the on-chip image buffer storing the searching range pixels 25 in encoder and temporary block 215 of reference blocks occupy a lot of silicon die area in VLSI design. For instance, in the main profile MPEG 2 encoder with 720×480 pixel per image, the 2 reference frames of 4:2:2 format requires a total of 1,036,800 Byte of reference memory and ˜64K bits of on-chip storage device to store the image of searching range. Compressing the reference frames by a factor of 1.5× to 2.0× stands for a potential of replacing the 2 Million Byte DRAM by a 1 Million Byte DRAM.
In summary, due to the need of reference memory buffer of previous and future frames and the need of a image buffer for temporarily storing the pixels of searching range, the cost of the reference memory buffer and on-chip searching range buffer are increasingly large with the increase of image resolution. From the bandwidth point view, the frequent accessing the mass image data consumes high power and causes I/O traffic jam which usually slow down the performance of compression and some times degrade the quality of image.
Therefore, it is beneficial to reduce the required amount of storage devices of the reference frames or on-chip buffer for storing pixels of searching range.